Optimal. Leaf size=114 \[ -\frac {3 \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{4 d}+\frac {3 \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {1-\cos (c+d x)}}-\frac {\cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {1-\cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2849, 2854,
213} \begin {gather*} -\frac {\sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{2 d \sqrt {1-\cos (c+d x)}}+\frac {3 \sin (c+d x) \sqrt {\cos (c+d x)}}{4 d \sqrt {1-\cos (c+d x)}}-\frac {3 \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 2849
Rule 2854
Rubi steps
\begin {align*} \int \sqrt {1-\cos (c+d x)} \cos ^{\frac {3}{2}}(c+d x) \, dx &=-\frac {\cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {1-\cos (c+d x)}}-\frac {3}{4} \int \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)} \, dx\\ &=\frac {3 \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {1-\cos (c+d x)}}-\frac {\cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {1-\cos (c+d x)}}+\frac {3}{8} \int \frac {\sqrt {1-\cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {3 \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {1-\cos (c+d x)}}-\frac {\cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {1-\cos (c+d x)}}+\frac {3 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{4 d}\\ &=-\frac {3 \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{4 d}+\frac {3 \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {1-\cos (c+d x)}}-\frac {\cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {1-\cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.50, size = 284, normalized size = 2.49 \begin {gather*} -\frac {\sqrt {-((-1+\cos (c+d x)) \cos (c+d x))} \left (3 \tanh ^{-1}\left (\frac {e^{i d x}}{\sqrt {\cos (c)-i \sin (c)} \sqrt {\cos (c)+e^{2 i d x} (\cos (c)+i \sin (c))-i \sin (c)}}\right ) \left (i+\cot \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c)-i \sin (c)}+3 \tanh ^{-1}\left (\frac {\sqrt {\cos (c)+e^{2 i d x} (\cos (c)+i \sin (c))-i \sin (c)}}{\sqrt {\cos (c)-i \sin (c)}}\right ) \left (i+\cot \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c)-i \sin (c)}+2 \sqrt {2} \left (-2 \cos \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {3}{2} (c+d x)\right )\right ) \csc \left (\frac {1}{2} (c+d x)\right ) \sqrt {\cos (c+d x) (\cos (d x)+i \sin (d x))}\right )}{8 d \sqrt {\left (1+e^{2 i d x}\right ) \cos (c)+i \left (-1+e^{2 i d x}\right ) \sin (c)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 164, normalized size = 1.44
method | result | size |
default | \(\frac {\left (-1+\cos \left (d x +c \right )\right ) \left (2 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right )-\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \cos \left (d x +c \right )-3 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}+3 \arctanh \left (\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\right )\right ) \sqrt {2-2 \cos \left (d x +c \right )}\, \left (\cos ^{\frac {3}{2}}\left (d x +c \right )\right ) \sqrt {2}}{8 d \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )^{3}}\) | \(164\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1305 vs.
\(2 (96) = 192\).
time = 0.61, size = 1305, normalized size = 11.45 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 124, normalized size = 1.09 \begin {gather*} -\frac {2 \, {\left (2 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 3\right )} \sqrt {-\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} - 3 \, \log \left (-\frac {2 \, {\left (\cos \left (d x + c\right ) + 1\right )} \sqrt {-\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} - {\left (2 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right ) \sin \left (d x + c\right )}{8 \, d \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {1 - \cos {\left (c + d x \right )}} \cos ^{\frac {3}{2}}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {1-\cos \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________